//
//  NYFocusViewController.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/7.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYFocusViewController.h"
#import "NYWebViewController.h"

#import "NYHomeFocusModel.h"

@interface NYFocusViewController ()

@property (nonatomic, strong) NYWebViewController *webViewController;
@property (nonatomic, strong) NYHomeFocusModel *itemModel;

@end

@implementation NYFocusViewController

#pragma mark - Life Cycle Methods
- (instancetype)initWithFocusModel:(NYHomeFocusModel *)itemModel {
    self = [super init];
    if (self) {
        _itemModel = itemModel;
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];

}
#pragma mark - Intial Methods
- (void)initSubviews {
    [super initSubviews];
    
    self.webViewController = [NYWebViewController webViewControllerWithUrlString:self.itemModel.url];
    [self.webViewController willMoveToParentViewController:self];
    [self addChildViewController:self.webViewController];
    self.controllerView.contentView = self.webViewController.view;
    [self.webViewController didMoveToParentViewController:self];
}
#pragma mark - Network Methods

#pragma mark - Target Methods

#pragma mark - Public Methods

#pragma mark - Private Method
- (void)configNavigationBar:(BaseNavigationBar *)navigationBar {
    [super configNavigationBar:navigationBar];
    self.title = self.itemModel.title;
}
- (UIImage *)navigationBarShadowImage {
    return [[UIImage nav_bar_shadows] qmui_imageWithAlpha:0.8];
}
+ (NYViewControllerNavigationBarType)navigationBarType {
    
    return NYViewControllerNavigationBarTypeBlue;
}

#pragma mark - External Delegate

#pragma mark - Setter Getter Methods

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
